import java.util.*;

public class CompareToTest {

	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		System.out.println("Input 0 to quit..");
		
		while(true) {
			
			System.out.println("Input first string:");
			String temp1 = input.nextLine();
			
			//Test for quit flag
			if(temp1.equals("0")) System.exit(0);
			
			System.out.println("Input second string:");
			String temp2 = input.nextLine();
			
			System.out.println(temp1.compareTo(temp2));
		}

	}

}
